var urlstr='http://localhost:8080'

var jsJson= function(){
	return {
		postrequest(urlstring,params,callback){
			$.ajax({
				type: 'post',
				cache: false,
				async: false,
				contentType: "application/json",
				dataType: "json", //返回值类型
				url:urlstr+urlstring,
				data: JSON.stringify(params),
				success: function(data) {
					callback(data)
				},
				error: function() {
					alert('服务调用失败!', {
						icon: 2
					});
				}
			});
		},
	}
}
